<h2>Projects</h2>
<% if @projects.size == 0 %>
No projects. To add a project, fill the following form and click save.<br>
<br>
<%else%>
<h3>Edit</h3>
<table class="tasks">
<% for @project in @projects %>
<tr id="tr<%=@project.id%>">
<td><%= link_to(@project.name, :action=> :edit, :id=>@project) %></td>
<td><%= @project.users.size %> users</td>
<td><%= @project.tasks.size %> tasks</td>

<!--<td><%= link_to_remote(image_tag("delete-page-red.gif", :border => 0), :complete => "eval(request.responseText)",  :url => {:action => :delete, :id => @project.id}, :confirm => "Delete this project ?") %></td>-->
</tr>
<% end %>

<% end %>

</table>

<h3>New project</h3>
<%= form_tag :action=> :add %>
<table class="tasks">
<tr><td>Name</td><td><%= text_field(:new, :name, :size => 20, :class => "new") %></td></tr>
<tr><td>&nbsp;</td><td><input class="button" type="submit" value="Save"></td></tr>
</table>
<%= end_form_tag%>

